package com.xy9860.order.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.UUID;

/**
 * @author xy9860
 * @Description 控制器
 * Copyright: Copyright (c) 2020
 * Company: Sichuan haiwujiang information technology Co., Ltd
 * @since 2020/7/1
 */
@RestController
@RequestMapping("order")
@Slf4j
public class OrderController {

    @GetMapping
    public String order(String userId) {
        String orderId = UUID.randomUUID().toString();
        log.info("userId=[{}],下单成功,orderId=[{}]",userId,orderId);
        return orderId;
    }
}
